function upd(){
    const password1=document.querySelector("#pwd1").value
    const password2=document.querySelector("#pwd2").value
    const password3=document.querySelector("#pwd3").value
    const id=JSON.parse(sessionStorage.getItem("userInfo")).mid
    const password4=JSON.parse(sessionStorage.getItem("userInfo")).password
    console.log(password1,password2,password3,password4,id,)
    if(!(password1&&password2&&password3)){
        return alert("密码格式输入错误！")
    }
    if(password1!=password4){
        return alert("原密码错误！")
    }
    if(password2!=password3){
        return alert("请检查输入的新密码！")
    }
    Ajax({
        url:"http://localhost/hotel/php/updatepassword.php",
        data:{id,password:password2},
        success(){
            location.href='../html/login.html'
        }
    })
}